Skip to main content

Bulk Messaging

The Bulk Messaging API enables businesses to send personalized, template-based WhatsApp messages to multiple recipients in a single request. It supports dynamic variables, media, and buttons for efficient large-scale customer communication.


Request Syntax

POST /api/v2/message/<business-id>/template?apikey=<api-key>

Request Body

{ 
"message": {
"messageType": "template",
"name": "google_reviews_1",
"language": "en_US",
"components": [
{
"componentType": "header",
"parameters": [
{
"type": "media",
"mediaType": "image",
"mediaLink": "https://prodimagelist.s3.ap-south
1.amazonaws.com/163605483505655/ec041c3e23d4401184e5e7b121fc194f.jpeg"
}
]
},
{
"componentType": "body",
"parameters": [
{
"text": "1",
"type": "text"
},
{
"text": "2",
"type": "text"
}
]
},
{
"componentType": "button",
"index": "1",
"parameters": [
{
"text": "3",
"type": "text"
}
],
"sub_type": "url"
}
]
},
"subscribers": [
{
"subscriberId": "919739316704",
"variables": [
"Sunil",
"1234",
"?Kid_ID=123"
]
}
],
"phoneNumberId": "phoneNumberId"
}

Response Body

{
"transactionId": "9bb17cdf-759b-4238-8165-be3191db38dc"
}

Properties

PlaceholderDescription
messageRefer Message table in the Single Message api section
SubscribersList of subscribers to whom the message is to be sent
VariablesArray of string. These strings will be replaced in the templates

Example

Sample Request

curl --location --request POST 'https://alb-backend.msgkart.com/api/v2/message/<business-id>/template?apikey=<api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"message": {
"messageType": "template",
"name": "google_reviews_1",
"language": "en_US",
"components": [
{
"componentType": "header",
"parameters": [
{
"type": "media",
"mediaType": "image",
"mediaLink": "https://prodimagelist.s3.ap-south-1.amazonaws.com/163605483505655/ec041c3e23d4401184e5e7b121fc194f.jpeg"
}
]
},
{
"componentType": "body",
"parameters": [
{
"text": "1",
"type": "text"
},
{
"text": "2",
"type": "text"
}
]
},
{
"componentType": "button",
"index": "1",
"parameters": [
{
"text": "3",
"type": "text"
}
],
"sub_type": "url"
}
]
},
"subscribers": [
{
"subscriberId": "919739316704",
"variables": [
"Sunil",
"1234",
"?Kid_ID=123"
]
}
],
"phoneNumberId": "phoneNumberId"
}'